{extends file="../lists.html"}
{block name=function}
    {function name=list_call_show_value}
		{include "Setting/show_item.html" data=$item}
	{/function}
    
    {function name=item_action_set item=[]}{strip}
		<a class="layui-btn layui-btn-primary layui-btn-sm javascript" data-type="{$item.type}" rel="ajax_set" href="{url('set',['id'=>$item.id])}"><i class="layui-icon">&#xe614;</i>设置</a>
    {/strip}{/function}
{/block}


{block name=script}
<script>
function ajax_set(){
    var url  = $(this).attr('href') ;
    var back_this=this;
    var type = $(this).attr('data-type') ;
    var height  = 230 ;
    if($.inArray(type,['textarea','keyvalue','array','file']) != -1) height = 260;
    if($.inArray(type,['color']) != -1) height = 290;
    
    
    layer.open({
        type: 2,
        title: '设置',
        offset: '150px',
        shadeClose: false,
        shade:  [0.3, '#000000'],
        area: ['500px', height+'px'],
        content: url
    });
}
</script>
{/block}